import {ModulesInfo} from "@/types/module";
import {TimeType} from "@/types/user";

interface Permission {
  Code: string
  Name: string
  IsButton: boolean,
  IsHide: boolean,
  IskeepAlive: boolean,
  Func: string
  OrderSort: number,
  Icon: string
  Description: string
  Enabled: true,
  PnameArr: string[],
  PCodeArr: [],
  MName: string
  hasChildren: true,
  Children: [],
  Module: ModulesInfo,
  Pid: number,
  Mid: number,
  PidArr: number[],
  Id: number,
  ModifyTime: TimeType,
  CreateTime: TimeType,
  CreateId: number,
  ModifyId: number,
  IsDeleted: true,
  Remark: string
}


export interface RolesIds {
  permissionids: number[] | string[]
  assignbtns: string[]
}


export interface MenuTree {
  value?: number,
  Pid?: number,
  label?: string,
  order?: number,
  isbtn?: boolean,
  disabled?: boolean,
  children?: string[],
  btns?: string[]
}

export type PermissionPartial = Partial<Permission>
